while True:
    people = {
        '张三': {'phone': 111, 'address': '塞班岛'},
        '李四': {'phone': 222, 'address': '非洲'},
        '王五': {'phone': 333, 'address': '亚马逊'}
    }
    name=input('请输入要查询的名字：')
    l={'p':'电话号码','d':'地址'}
    if name in people.keys():
        d=input('请输入要查询的内容（电话p/地址d）')
        if d=='p':
            key='phone'
            print('{}的{}是{}'.format(name,l[d],people[name][key]))
        elif d=='d':
            key='address'
            print('{}的{}是{}'.format(name,l[d],people[name][key]))
        else:
            print('查无此人')
            break
